package Day15.poly_.six;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/22 16:54
 */
public class Student extends Person{
    private  double freeMoney;//学号

    public Student(String name, int age, double freeMoney) {
        super(name, age);
        this.freeMoney = freeMoney;
    }

    public double getFreeMoney() {
        return freeMoney;
    }

    public void setFreeMoney(double freeMoney) {
        this.freeMoney = freeMoney;
    }

    @Override
    public String say() {
        return super.say()+"，每周零花钱："+ freeMoney;
    }
}
